{% for block in blocks %}
  {% if block.type != 'header' and block.type != 'footer' %}
    {% assign section = block.params %}
    

    {% if section.settings.block_diy_css %}
      <style>
        {{section.settings.block_diy_css | replace: "{block_id}",block.id}}
      </style>
    {% endif %}

    {% comment %} 装修模式下display true 代码不显示 控制显示不显示 {% endcomment %}
    {% if is_theme_edit == 1 %}
      <div id="block-section-{{block.id}}" {% if section.display %}style="display:none"{% endif %} data-section-type="{{ block.type }}" data-section-id="{{ block.id }}">
        {% section section_name ,{ section : section, block_id:block.id, section_name:block.type } %}
      </div>
    {% else %}
        {% comment %} 发布环境下直接不渲染元素 {% endcomment %}
        {% unless section.display %}
          <div id="block-section-{{block.id}}" data-section-type="{{ block.type }}" data-section-id="{{ block.id }}">
            {% section section_name ,{ section : section, block_id:block.id, section_name:block.type } %}
          </div>
        {% endunless %}
    {% endif %}

  {% endif %}
{% endfor %}
